package com.itheima.service;

import com.itheima.domain.Answer;
import com.itheima.domain.Question;
import org.springframework.transaction.annotation.Transactional;

import javax.servlet.http.HttpSession;
import java.util.List;

@Transactional
public interface AnswerService {
    public void save(Answer answer,HttpSession session);

    public Boolean update(Answer answer);


    public Boolean delete(Integer aid);


    public Answer getById(Integer aid);


    public List<Answer> getAll();

    List<Answer> getByQid(Integer qid);

    int addlike(Integer aid);
    int cancellike(Integer aid);

    int answerCount(Integer qid);
}
